import 'package:flutter/material.dart';
import 'package:flutter_deer/mvp/base_page_presenter.dart';
import 'package:flutter_deer/net/base_entity.dart';
import 'package:flutter_deer/net/net.dart';
import 'package:flutter_deer/setting/iview/account_logout.dart';


class AccountLogoutPresenter extends BasePagePresenter<AccountLogoutIMvpView> {

  @override
  void initState() {
  }

  Future<dynamic> logout() async {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      asyncRequestNetwork<OperatorBaseEntity>(Method.delete,
        url: HttpApi.logout,
        onSuccess: (data) {
          view.setLogoutResult(data?.data);
        },
        onError: (code,msg){

        }
      );
    });
  }

}
